package com.bakend.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Date;

/**
 * (User)表实体类
 *
 * @author makejava
 * @since 2021-05-02 03:28:58
 */
@SuppressWarnings("serial")
@TableName("sys_user")
public class User extends Model<User> {

    private Integer id;
    //用户账号
    private String userCode;
    //密码
    private String pwd;
    //用户名称
    private String userName;
    //创建时间
    @TableField(fill = FieldFill.INSERT) //创建时自动填充
    private Date createTime;
    //账号状态：1正常，2被封禁，4被限制访问
    private String status;
    //密码盐
    private String salt;
    //上次登录ip
    private String lastLoginIp;
    //ip所在地
    private String ipArean;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getLastLoginIp() {
        return lastLoginIp;
    }

    public void setLastLoginIp(String lastLoginIp) {
        this.lastLoginIp = lastLoginIp;
    }

    public String getIpArean() {
        return ipArean;
    }

    public void setIpArean(String ipArean) {
        this.ipArean = ipArean;
    }

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}